<!--上一位开发功能未做完-->
<template>
  <view :style="{ paddingTop: navbarData.statusBarHeight + 40 + 'px' }">
    <nav-bar class="navpos" :navbarData="navbarData"></nav-bar>
    <anil-seat
      :title="getBasicArr.name"
      :info="getBasicArr.introduce"
      :room-name="getBasicArr.show_address"
      :seat-data="seatData"
      :max="4"
      @confirm="onConfirmSeat"
    >
    </anil-seat>

    <!--购票成功-->
    <view v-if="ticketpop" class="ticketing_screen"></view>
    <view v-if="ticketpop" class="ticketing_sucess">
      <image
        src="http://llg.qiniu.comeinvip.com/images/purvalue_img.png"
      ></image>
      <text @click="ticketShow()">立即查看</text>
    </view>
  </view>
</template>

<script>
import util from "@/utils/util.js";
import navBar from "@/components/navbar/navbar.vue";
import anilSeat from "@/uni_modules/anil-seat/components/anil-seat/anil-seat.vue";
import { seatData } from "@/utils/seat-data.js";
export default {
  components: {
    "nav-bar": navBar,
    anilSeat,
  },
  data() {
    return {
      seatData: seatData,
      isIphoneX: false,
      navbarData: {
        // 头部组件所需参数
        showCapsule: 2, //是否显示左上角返回图标   1表示白色显示    0表示不显示 2黑色
        positionShow: 1, //0不显示定位 1 显示定位
        backgroundCor: 2, //0 无背影色 1首页背景颜色   2白色
        statusBarHeight: uni.getSystemInfoSync()["statusBarHeight"],
        navHeight: 45,
        titles: "选座",
      },
      ticketpop: false,
      getBasicArr: [],
    };
  },
  onLoad(options) {
    this.getBasicArr = JSON.parse(options.con);
    // 座位图初始化 - seatData座位数据
    this.$refs["anilSeat"].initData(this.seatData);
  },
  methods: {
    onConfirmSeat(items) {
      //显示成功提示
      this.ticketpop = true;
    },
    ticketShow() {
      this.ticketpop = false;
    },
  },
  created() {
    this.isIphoneX = util.getSystemInfoForPhone(); // 判断手机机型是否为iPhone X以上
  },
};
</script>

<style lang="scss">
@import url("@/static/css/contents.css");
page {
  background-color: #eee;
  height: 100%;
}
.navpos {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  width: 750rpx;
}
</style>
